package com.study.quiz.enums;

import lombok.Data;
import lombok.Getter;

/**
 * @author CJunGod
 * @create 2020-03-13 20:11
 **/
@Getter
public enum NotifictionEnum {

    REPLY_QUESTION(1, "回复了问题"),

    REPLY_COMMENT(2, "回复了评论"),

    ;

    private int type;

    private String name;

    NotifictionEnum(int type,String name){
        this.type = type;
        this.name = name;
    }

    public static String nameOfType(int type){
        for (NotifictionEnum value : NotifictionEnum.values()) {
            if(value.getType() == type){
                return value.getName();
            }
        }
        return "";
    }
}
